<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<c:forEach items="${books}" var="book">
	<div>
		<a href="book/${book.id}"><span>书名:${book.bookname}</span>&nbsp;&nbsp;&nbsp;<span>作者:${book.author}</span>&nbsp;&nbsp;&nbsp;<span>图书编号:${book.bookindex}</span>&nbsp;&nbsp;&nbsp;<span>出版日期:${book.publicDate}</span>
			&nbsp;&nbsp;是否在馆:<c:choose>
				<c:when test="${book.isBorrowed}">否</c:when>
				<c:otherwise>是</c:otherwise>
			</c:choose> </a>
		<c:choose>
			<c:when test="${book.isBorrowed}"></c:when>
			<c:otherwise><button onclick="window.location.href='book/borrow/${book.id}'" >点此借书</button></c:otherwise>
		</c:choose>
		<br> <br>
	</div>
</c:forEach>